﻿<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    <!--_meta 作为公共模版分离出去-->
    <% layout("/common/_meta.html",{title:"修改消息通知"}){} %>
    <!--_meta 作为公共模版分离出去-->
</head>
<body style="background-color:#fff">
<div class="wap-container">
    <div class="panel">
        <div class="panel-body">
            <form action="${ctxPath}/notice/update" method="post" class="form form-horizontal" id="form-notice-add">
                <div class="row clearfix">
                    <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>标题：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="hidden" value="${notice.id}" name="id" id="id">
                        <input type="text" class="input-text" value="${notice.title!}" placeholder="标题" id="title" name="title">
                    </div>
                </div>
                <div class="row clearfix">
                    <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>内容：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <textarea id="content" name="content" cols="" rows="" class="textarea"  placeholder="内容">${notice.content!}</textarea>
                    </div>
                </div>
                <div class="row clearfix">
                    <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>强制弹出：</label>
                    <div class="form-controls col-xs-8 col-sm-8 skin-minimal">
                        <div class="radio-box">
                            <input name="isTip" type="radio" id="isTip-0" value="false"
                            <%if(notice.isTip == false){%>
                            checked
                            <%}%>
                            >
                            <label for="isTip-0">否</label>
                        </div>
                        <div class="radio-box">
                            <input name="isTip" type="radio" id="isTip-1" value="true"
                            <%if(notice.isTip == true){%>
                            checked
                            <%}%>
                            >
                            <label for="isTip-1">是</label>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>状态：</label>
                    <div class="form-controls col-xs-8 col-sm-8 skin-minimal">
                        <div class="radio-box">
                            <input name="isDisable" type="radio" id="isDisable-0" value="false"
                            <%if(notice.isDisable == false){%>
                            checked
                            <%}%>
                            >
                            <label for="isDisable-0">显示</label>
                        </div>
                        <div class="radio-box">
                            <input name="isDisable" type="radio" id="isDisable-1" value="true"
                            <%if(notice.isDisable == true){%>
                            checked
                            <%}%>
                            >
                            <label for="isDisable-1">隐藏</label>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-xs-8 col-sm-8 col-xs-offset-3 col-sm-offset-3">
                        <button type="submit" class="btn btn-success btn-block radius">修改消息通知</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<% layout("/common/_footer.html"){} %>
<% layout("/common/_validate.html"){} %>
<!--/_footer 作为公共模版分离出去-->
<script type="text/javascript">
    $(function(){

        $("#form-notice-update").validate({
            rules:{
                id:{
                    required:true
                },
                title:{
                    required:true,
                    maxlength:50
                },
                content:{
                    required:true,
                    maxlength:500
                },
                isTip:{
                    required:true
                },
                isDisable:{
                    required:true
                }
            },
            submitHandler:function(form){
                loading();
                form.submit();
            }
        });
    });
</script>
</body>
</html>
